import { $Http } from '@/config/service/http';

export enum Api {
  // 文件模板
  fileTemplatePage = '/dmsfile/publicFileProcessOrder/templatePage', // 模板文件分页查新
  fileTemplatePreview = '/dmsfile/resourceFileInfo/getPreviewFileUrl', // 获取文件预览地址
  fileTemplateDownload = '/dmsfile/resourceFileInfo/downloadFile' // 下载
}

export const fileTemplatePage = (params) => {
  return $Http.api(Api.fileTemplatePage, params, 'post');
};

// export const fileTemplatePreview = (id, params) => {
//   return $Http.api(Api.fileTemplatePreview + '/' + id, params, 'get');
// };

export const fileTemplatePreview = (params) => {
  return $Http.api(Api.fileTemplatePreview, params, 'post');
};

export const fileTemplateDownload = (id, params) => {
  return $Http.api(Api.fileTemplateDownload + '/' + id, params, 'get');
};
